package com.lin.advice;

import org.aspectj.lang.ProceedingJoinPoint;
import org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint;

public class Advice {
    public void before() {
        System.out.println("before advice...");
    }
    public void after() {
        System.out.println("after advice...");
    }
    public Object around(ProceedingJoinPoint pjp) throws Throwable {
        System.out.println("around before advice...");
        Object proceed = pjp.proceed();
        System.out.println("around after advice...");
        return proceed;
    }
    public void afterThrowing() {
        System.out.println("afterThrowing advice...Exception!!!");
    }
    public void afterReturning() {
        System.out.println("afterReturning advice...");
    }

}
